DataAnalyst resources#7591
Conversation
|
WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive. |
labkey-jeckels
left a comment
There was a problem hiding this comment.
This looks good to me, but it would be nice for @cnathe and @labkey-alan to give it a quick review as the client API owners.
| A LabKey MCP server is configured (see `.mcp.json`). Use these tools to explore the server interactively: | ||
|
|
||
| | Tool | Purpose | | ||
| |---|---| | ||
| | `mcp__labkey__setContainer` | **Must be called first.** Sets the active container (project/folder) for subsequent calls. Path format: `MyProject/MyFolder` (no leading slash). | | ||
| | `mcp__labkey__whereAmIWhoAmITalkingTo` | Shows current user, server info, and active container. | | ||
| | `mcp__labkey__listContainers` | Lists all containers the user has read access to. | | ||
| | `mcp__labkey__listSchemas` | Lists all schemas in the active container. | | ||
| | `mcp__labkey__listTables` | Lists tables/queries within a schema. | | ||
| | `mcp__labkey__listColumns` | Shows column metadata (name, type, description) for a table. Also returns SQL source for saved queries. | | ||
| | `mcp__labkey__getSourceForSavedQuery` | Returns the SQL source of a saved query. | | ||
| | `mcp__labkey__validateSQL` | Validates LabKey SQL syntax without executing it. | | ||
|
|
||
| ### MCP Workflow | ||
|
|
||
| 1. Call `listContainers` to find available containers | ||
| 2. Call `setContainer` with the desired container path | ||
| 3. Use `listSchemas` -> `listTables` -> `listColumns` to explore the data model | ||
| 4. Use `validateSQL` to check queries before running them |
There was a problem hiding this comment.
Can we share this or other common blocks? I imagine it'll need updates as we build out MCP.
Co-authored-by: Josh Eckels <jeckels@labkey.com>
labkey-alan
left a comment
There was a problem hiding this comment.
The Python documentation looks correct. I am not a huge fan that we are adding a third place that has documentation for our Python API, but we can find a better solution for that later.
Yes, that was my take as well. The documentation for R looks good and it a nice mix of docs and examples. However, this is another duplication of doc info that makes it trickier to keep things in sync and up-to-date. Is it possible to reference the Rlabkey .Rd files in some way instead of duplicating the info here? |
Rationale
Additional resources to support MCP user scenarios, specifically data analysis.
Related Pull Requests
Changes